/***************************************************************************
 *   Copyleft 2006-2007 by												   *
 *	 Iwanicki Krzysztof													   *
 *   <gamma.mini.pw.edu.pl/~iwanickik>									   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 ***************************************************************************/
#ifndef __FILEOUTPUT_H__
#define __FILEOUTPUT_H__

#include <windows.h>
#include <iostream>
#include <ostream>
#include <fstream>
#include <string>
#include <iomanip>
#include <stdio.h>
#include <stdlib.h>
#include "../Types/Types.h"

#define LOGS_FILE				"logs.txt"

typedef std::ofstream Output;


class FileOutput {
private:
	cVoid PrintTime();
	static cChar mTimeBuffer [14];
	static cChar mBuffer [4096];

	cVoid ClearBuffer();
	cVoid ClearTimeBuffer();
public:
	Output mOutput;
	
	/**************************************************************
	* Constructors                                                *
	***************************************************************/
	FileOutput() { }
	~FileOutput() { }

	/**************************************************************
	* Other helpful functions                                     *
	***************************************************************/
	cVoid Info(const cChar * print, ...);
	cVoid Debug(const cChar * print, ...);
	cVoid Error(const cChar * print, ...);
	cVoid Warning(const cChar * print, ...);
	cVoid Open();
	cVoid Close();
};

#endif